package com.lmz.thredparty.controller;

import com.lmz.common.utils.R;
import com.lmz.thredparty.config.smsConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sms")
public class SmsSendController {

    @Autowired
    private smsConfig smsConfig;

    @GetMapping("sendcode")
    public R sendCode(@RequestParam("phone") String phone, @RequestParam("code") String code) {
        smsConfig.sendCode(phone, code);
        return R.ok();
    }
}